import numpy as np
from bokeh.plotting import figure, output_notebook, show

from bokeh.plotting import figure, output_file, show

# 准备数据
N = 4000
x = np.random.random(size=N) * 100
y = np.random.random(size=N) * 100
radii = np.random.random(size=N) * 1.5
colors = [
    "#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)
]

# 在notbook中展示
output_notebook()

TOOLS = "crosshair,pan,wheel_zoom,box_zoom,reset,box_select,lasso_select"

# 创建图表，并添加图标栏工具
p = figure(tools=TOOLS, x_range=(0, 100), y_range=(0, 100))

# 添加圆绘图渲染函数，并且定义元素的颜色、样式
p.circle(x, y, radius=radii, fill_color=colors, fill_alpha=0.6, line_color=None)

# 显示图表
show(p)